<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-model</title>
	</head>
	<body>
		
		<div id='app'>
			<input type="button" value="修改message" @click="setM">
			<input type="text" v-model="message" @keyup.enter="getM">
			<h2>{{ message }}</h2>
		</div>
		
		 <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script>	 
		var vm = new Vue({
				 el: "#app",
				 data: {
					 message:"超越"
				 },
				 methods: {
					 getM:function(){
						 alert(this.message);
					 },
					 setM:function(){
						 this.message = "减豆";
					 }
				 },
			 })
	    
		
		 </script>
	</body>
</html>
